package cn.tiancaifan.micro.controller.sta;


import cn.tiancaifan.micro.entity.SystemResults;
import cn.tiancaifan.micro.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/statistics/all/")
public class StaContrller {

    @Autowired
    StudentService studentService;

    @GetMapping("/gender")
    public SystemResults statisticByGender(){
        return studentService.statisticByGender();
    }

    @GetMapping("/department")
    public SystemResults statisticByDepartment(){
        return studentService.statisticByDepartment();
    }
}
